<ui:composition template="/WEB-INF/templates/login-template.xhtml"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

	<ui:define name="menu"></ui:define>
	<ui:define name="submenu"></ui:define>
	<ui:define name="sidebar">
		<ui:include src="/WEB-INF/templates/public-sidebar.xhtml" />
	</ui:define>
	<ui:define name="content">	
		 	
		
	<h:form id="Feedback"> 
		 <p:growl/>
		
		 <h:outputText value="View Feedback" styleClass="outputTextTitle"/>	
	   
	   <h:panelGrid >
		
        <p:panel header="Technical Details To Be Filled By Interviewer / Lead Consultants"> 
        	<h:panelGrid columns="3"  cellspacing="7" style="width: 100%" columnClasses="employeeDetailLabel,gridCellMiddleLeftAligned">  
          
	           <h:outputLabel value="RRF Code" />
	           <h:outputLabel value=":" />
	           <h:outputText value="#{viewFeedBackBean.recruitmentProfile.recruitmentRequestCode}"  />
	          
	           <h:outputLabel value="Technology" />
	           <h:outputLabel value=":" />
	           <h:outputText value="#{viewFeedBackBean.recruitmentProfile.technology}"   />
	           
	           <h:outputLabel value="Candidate Name" />
	           <h:outputLabel value=":" />
	           <h:outputText value="#{viewFeedBackBean.recruitmentProfile.candidateName}" />
	          
	           <h:outputLabel value="Candidate Email" />
	           <h:outputLabel value=":" />
	           <h:outputText value="#{viewFeedBackBean.recruitmentProfile.candidateEmail}" />
	           
	           <h:outputLabel value="Candidate Contact" />
	           <h:outputLabel value=":" />
	           <h:outputText value="#{viewFeedBackBean.recruitmentProfile.candidateMobileNumber}"/>
           
      	   </h:panelGrid>
        </p:panel>
      
       <p:panel header="Skill Ratings on a scale[1-small and 10- High ]">       
       <h:panelGrid  cellpadding="10" columns="2" style="width: 100%">             
           <p:dataTable value="#{viewFeedBackBean.skillRatingsSingleLevel}" var="viewSkills">
	
				<p:column headerText="Skill Area">
						<h:outputText value="#{viewSkills.rrfSelectedSkill.skillName}" />
				</p:column>
				<p:column headerText=" Interviewer1 Ratings " >
						<h:outputText value="#{viewSkills.skillRating}" />				
				</p:column>
				<p:column headerText="Interviewer1 Remarks">
						<h:outputText value="#{viewSkills.skillRemarks}" />
				</p:column>				
		   </p:dataTable>
		   <p:dataTable value="#{viewFeedBackBean.skillRatingsTwoLevel}" var="twoLevelSkills" rendered="#{viewFeedBackBean.recruitmentRequest.interviewLevel  eq 'Two Level' }" style="vertical-align: top;" >	
				
				<p:column headerText=" Interviewer2 Rating" >
						<h:outputText value="#{twoLevelSkills.skillRating}" />				
				</p:column>
				<p:column headerText="Interviewer2 Remarks" >
						<h:outputText value="#{twoLevelSkills.skillRemarks}" />
				</p:column>
					
		   </p:dataTable>
        </h:panelGrid>
      </p:panel>
         
       
       <p:panel header="Interviewer Views">   
       <h:panelGrid  cellpadding="10" columns="2" style="width: 100%"> 
         <h:panelGrid  cellspacing="7" style="width: 100%" columns="3" columnClasses="employeeDetailLabel,gridCellMiddleLeftAligned">  
          
           <h:outputLabel value="Expected Joining Date" />
           <h:outputLabel value=":" />
           <h:outputText value="#{viewFeedBackBean.recruitmentProfile.expectedJoiningDate}" >
         	  <f:convertDateTime pattern="dd-MMM-yyyy" />
           </h:outputText>
           
           <h:outputLabel value="Strengths" />
           <h:outputLabel value=":" />
           <h:outputText value="#{viewFeedBackBean.recruitmentProfile.intwr1Strengths}"   />
           
           <h:outputLabel value="Areas Of Improvement" />
           <h:outputLabel value=":" />
           <h:outputText value="#{viewFeedBackBean.recruitmentProfile.intwr1AreaOfImprovement}"  />
           
           <h:outputLabel value="Remarks / Overall Impression" />
           <h:outputLabel value=":" />
           <h:outputText value="#{viewFeedBackBean.recruitmentProfile.intwr1FinalRemarks}"   />
           
           <h:outputLabel value="Final Recommendation " />
           <h:outputLabel value=":" />
           <h:outputText value="#{viewFeedBackBean.recruitmentProfile.intwr1FinalRecommendation}"   /> 
           
        </h:panelGrid>
        
        <h:panelGrid  cellspacing="7" columns="1" rendered="#{viewFeedBackBean.recruitmentRequest.interviewLevel  eq 'Two Level' }">  
          
           <h:outputText value="#{viewFeedBackBean.recruitmentProfile.expectedJoiningDate}" >
         	  <f:convertDateTime pattern="dd-MMM-yyyy" />
           </h:outputText>           
          
           <h:outputText value="#{viewFeedBackBean.recruitmentProfile.intwr2Strengths}"   />           
      
           <h:outputText value="#{viewFeedBackBean.recruitmentProfile.intwr2AreaOfImprovement}"  />
                     
           <h:outputText value="#{viewFeedBackBean.recruitmentProfile.intwr2FinalRemarks}"   />           
        
           <h:outputText value="#{viewFeedBackBean.recruitmentProfile.intwr2FinalRecommendation}"   /> 
           
        </h:panelGrid>
        
        </h:panelGrid>
     </p:panel>
     
     <!-- VIEW MANAGER RECOMMENDATIONS -->
	    <p:panel header="Manager Recommendation for :  #{viewFeedBackBean.recruitmentProfile.candidateName}" rendered="#{viewFeedBackBean.activity eq 'approvedByHigherAuthority' or (viewFeedBackBean.activity  eq 'releaseOfferLetter')}" > 
	    <h:panelGrid cellspacing="7" style="width: 100%" columns="3" columnClasses="employeeDetailLabel,gridCellMiddleLeftAligned">

		           
			           <h:outputLabel value="CTC(Per Annum)" />
			           <h:outputLabel value=":" />
			           <h:outputLabel value="#{viewFeedBackBean.recruitmentProfile.ctc}"  />
			          
			           <h:outputLabel value="ECTC(Per Annum)" />
			           <h:outputLabel value=":" />
			           <h:outputLabel value="#{viewFeedBackBean.recruitmentProfile.ectc}"  />
			           
			           <h:outputLabel value="% of Hike Expected " />
			           <h:outputLabel value=":" />
			           <h:outputLabel value="#{viewFeedBackBean.rrfManagerRecommendation.percentHikeExpected}"  />
			          
			           <h:outputLabel value="ERPandERP Offer(Per Annum)" />
			           <h:outputLabel value=":" />
			           <h:outputLabel value="#{viewFeedBackBean.rrfManagerRecommendation.erpOfferPriceLPA}" />
			       			
			           
			           <h:outputLabel value="% of Hike Offered(ERP)" />
			           <h:outputLabel value=":" />
			           <h:outputLabel value="#{viewFeedBackBean.rrfManagerRecommendation.erpOfferedHikePercent}"/>
			           
			           <h:outputLabel value="Band" />
			           <h:outputLabel value=":" />
			           <h:outputLabel value="#{viewFeedBackBean.recruitmentProfile.band.band}" />
			          
			           <h:outputLabel value="Notice Period" />
			           <h:outputLabel value=":" />
			           <h:outputLabel value="#{viewFeedBackBean.recruitmentProfile.candidateNoticePeriod}" />
			           
			           <h:outputLabel value="Proceed With Notice Period Buyout" />
			           <h:outputLabel value=":" />
			           <h:outputLabel value="#{viewFeedBackBean.rrfManagerRecommendation.processNoticePeriodBuyOut}" />
						
			           <h:outputLabel value="Notice Period Buyout" />
			           <h:outputLabel value=":" />
			           <h:outputLabel value="#{viewFeedBackBean.recruitmentProfile.noticePeriodBuyOut}" />
			           
			           <h:outputLabel value="Notice Period Buyout Cost" />
			           <h:outputLabel value=":" />
			           <h:outputLabel value="#{viewFeedBackBean.recruitmentProfile.noticePeriodBuyOutCost}" />
			           
			          <h:outputLabel value="Notice Period Buyout Remarks" />
			           <h:outputLabel value=":" />
			           <h:outputLabel value="#{viewFeedBackBean.rrfManagerRecommendation.noticePeriodBuyOutRemarks}" />
			          			          			           
			           <h:outputLabel value="Manager Remarks" />
			           <h:outputLabel value=":" />
			           <h:outputLabel value="#{viewFeedBackBean.rrfManagerRecommendation.managerRemarks}" />
			           
			           <h:outputLabel value=" Manager Final Recommendation" />
			           <h:outputLabel value=":" />
			           <h:outputLabel value="#{viewFeedBackBean.rrfManagerRecommendation.managerRecommendation}" />			           		
			           
				</h:panelGrid>
				</p:panel>
     	
    
        <h:panelGroup style="float:right;">
		         <p:commandButton value="Back" onclick="history.go(-1);"  /> 	
		         <p:commandButton value="Manager Recommendation" disabled="#{viewFeedBackBean.disableManagerRecommendation}"
							oncomplete="recommendationDialog.show()" update="@form" process="@this"
							actionListener="#{viewFeedBackBean.createManagerRecommendationListener}" rendered="#{viewFeedBackBean.activity eq 'CreateManagerRecommendations'}" >
																			
				 </p:commandButton>				     
	    </h:panelGroup>  
	  
	</h:panelGrid>    
	
	 
	  
	    <p:dialog hideEffect="fade" showEffect="fade"
				header="Manager  Recommendations :  #{viewFeedBackBean.recruitmentProfile.candidateName} "
				id="recommendationDialog" widgetVar="recommendationDialog" resizable="false"
				modal="true" >
				<p:scrollPanel style="width:700px;height:500px" mode="native"> 
				<h:panelGrid columns="4" cellspacing="10">

					   <h:outputLabel value="*" style="color : red;"/>
					   <h:outputLabel value="RRF Code" />
			           <h:outputLabel value=":" />
			           <h:outputLabel value="#{viewFeedBackBean.recruitmentProfile.recruitmentRequestCode}" readonly="true" />
			          
			           <h:outputLabel value="*" style="color : red;"/>
			           <h:outputLabel value="Technology" />
			           <h:outputLabel value=":" />
			           <h:outputLabel value="#{viewFeedBackBean.recruitmentProfile.technology}" />
			           
			           <h:outputLabel value="*" style="color : red;"/>
			           <h:outputLabel value="Candidate Name" />
			           <h:outputLabel value=":" />
			           <h:outputLabel value="#{viewFeedBackBean.recruitmentProfile.candidateName}" />
			          
			           <h:outputLabel value="*" style="color : red;"/>
			           <h:outputLabel value="Candidate Email" />
			           <h:outputLabel value=":" />
			           <h:outputLabel value="#{viewFeedBackBean.recruitmentProfile.candidateEmail}" />
			           
			           <h:outputLabel value="*" style="color : red;"/>
			           <h:outputLabel value="Candidate Contact" />
			           <h:outputLabel value=":" />
			           <h:outputLabel value="#{viewFeedBackBean.recruitmentProfile.candidateMobileNumber}" />
			           
			           <h:outputLabel value="*" style="color : red;"/>
			           <h:outputLabel value="CTC(Per Annum)" />
			           <h:outputLabel value=":" />
			           <h:outputLabel value="#{viewFeedBackBean.recruitmentProfile.ctc}" />
			          
			           <h:outputLabel value="*" style="color : red;"/>
			           <h:outputLabel value="ECTC(Per Annum)" />
			           <h:outputLabel value=":" />
			           <h:outputLabel value="#{viewFeedBackBean.recruitmentProfile.ectc}" />
			           
			           <h:outputLabel value="*" style="color : red;"/>
			           <h:outputLabel value="Expected Joining Date" />
			           <h:outputLabel value=":" />
			           <p:calendar id="ExpectedJoiningDate" value="#{viewFeedBackBean.recruitmentProfile.expectedJoiningDate}" pattern="dd-MMM-yyyy"/>
			           
			           <h:outputLabel value="*" style="color : red;"/>
			           <h:outputLabel value="% of Hike Expected " />
			           <h:outputLabel value=":" />
			           <p:inputText value="#{viewFeedBackBean.rrfManagerRecommendation.percentHikeExpected}" readonly="true" />
			          
			           <h:outputLabel value="*" style="color : red;"/>
			           <h:outputLabel value="ERPandERP Offer(Per Annum)" />
			           <h:outputLabel value=":" />
			           <p:inputText id="ERPandERPOfferLPA" value="#{viewFeedBackBean.rrfManagerRecommendation.erpOfferPriceLPA}"  maxlength="7">
			       			<p:ajax event="change" listener="#{viewFeedBackBean.getERPOfferHike}" update="erpOfferedHike"  />		
			       	   </p:inputText>	
			           
			           <h:outputLabel value="*" style="color : red;"/>
			           <h:outputLabel value="% of Hike Offered(ERP)" />
			           <h:outputLabel value=":" />
			           <p:inputText value="#{viewFeedBackBean.rrfManagerRecommendation.erpOfferedHikePercent}" id="erpOfferedHike" readonly="true"/>
			           
			           <h:outputLabel value="*" style="color : red;"/>
			           <h:outputLabel value="Band " />
			           <h:outputLabel value=":" />
			           <p:selectOneMenu 
							value="#{viewFeedBackBean.selectedBandId}" style="width:160px;">
							<f:selectItem itemLabel="#{viewFeedBackBean.recruitmentProfile.band.band}" itemValue="#{viewFeedBackBean.recruitmentProfile.band.bandId}" />
							<f:selectItems value="#{viewFeedBackBean.bandsMap}" />
					   </p:selectOneMenu>	           
			          
			           <h:outputLabel value="*" style="color : red;"/>
			           <h:outputLabel value="Notice Period(In Days)" />
			           <h:outputLabel value=":" />
			           <p:inputText id="NoticePeriodInDays" value="#{viewFeedBackBean.recruitmentProfile.candidateNoticePeriod}" maxlength="3"/>
			           
			           <h:outputLabel value="*" style="color : red;"/>       
			           <h:outputLabel value="Proceed with Notice Period Buyout ?" />
			           <h:outputLabel value=":" />
			           <p:selectOneMenu value="#{viewFeedBackBean.rrfManagerRecommendation.processNoticePeriodBuyOut}" style="width:160px;" >
							<f:selectItems value="#{viewFeedBackBean.proceedWithBuyoutMap}" />
			   		   </p:selectOneMenu> 
			          
			           <h:outputLabel value="*" style="color : red;"/>
			           <h:outputLabel value="Notice Period Buyout" />
			           <h:outputLabel value=":" />
			           <p:inputText value="#{viewFeedBackBean.recruitmentProfile.noticePeriodBuyOut}" disabled="#{viewFeedBackBean.recruitmentProfile.noticePeriodBuyOut eq 'No'}" />
			           
			           <h:outputLabel value="*" style="color : red;"/>
			           <h:outputLabel value="Notice Period Buyout Cost" />
			           <h:outputLabel value=":" />
			           <p:inputText id="NoticePeriodBuyoutCost" value="#{viewFeedBackBean.recruitmentProfile.noticePeriodBuyOutCost}" maxlength="6" disabled="#{viewFeedBackBean.recruitmentProfile.noticePeriodBuyOut eq 'No'}"/>   			          
			           
			           <h:outputLabel value="*" style="color : red;"/>
			           <h:outputLabel value="Notice Period Buyout Remarks" />
			           <h:outputLabel value=":" />
			           <p:inputTextarea value="#{viewFeedBackBean.rrfManagerRecommendation.noticePeriodBuyOutRemarks}" rows="1" style="width:400px;" autoResize="false" disabled="#{viewFeedBackBean.recruitmentProfile.noticePeriodBuyOut eq 'No'}"/>
			           
			           <h:outputLabel value="*" style="color : red;"/>
			           <h:outputLabel value="Final Remarks" />
			           <h:outputLabel value=":" />
			           <p:inputTextarea value="#{viewFeedBackBean.rrfManagerRecommendation.managerRemarks}"  rows="1" style="width:400px;" autoResize="false"/>  
			           
			           <h:outputLabel value="*" style="color : red;"/>
			           <h:outputLabel value="Final Recommendation" />
			           <h:outputLabel value=":" />
			           <p:selectOneMenu value="#{viewFeedBackBean.rrfManagerRecommendation.managerRecommendation}" style="width:160px;">
			           		<f:selectItem itemLabel="--Choose One--" itemValue="" />
							<f:selectItem itemLabel="Recommended" itemValue="Recommended" />
							<f:selectItem itemLabel="Not Recommended" itemValue="Not Recommended" />
							<f:selectItem itemLabel="On Hold" itemValue="On Hold" />							
					   </p:selectOneMenu> 
					
				</h:panelGrid>		
				</p:scrollPanel>
				
				<h:panelGroup style="float:right;">
					<p:commandButton id="submitButton" value="Submit" actionListener="#{viewFeedBackBean.managerRecommendationAction}" update=":Feedback" >
							<f:param  name="rrfCode" value="#{viewFeedBackBean.rrfCode}" />
							<f:param  name="activity" value="#{viewFeedBackBean.activity}" />	
					</p:commandButton>			
					<p:commandButton id="closeButton" process="@this" value="Close" actionListener="#{viewFeedBackBean.dialogClose}" update="@form"/>	
				</h:panelGroup>					
						
			</p:dialog>
     </h:form>
	</ui:define>
	
</ui:composition>
